import React from 'react';
import CommonList from 'src/components/CommonLists/list';
import { Button } from 'antd';

class ModelAddList extends CommonList {
  constructor(props) {
    super(props);
    this.api = 'modelConfig';
    this.state = {
      applications: [],
      events: [],
    };
    this.operatorWidth = '200px';
    this.needOperateColumn = false;
    this.detailButton = (record) => {
      return (
        <Button
          size='small'
          type='link'
          onClick={this.props.detail && this.props.detail.bind(this, record, { title: '参数详情' })}
        >
          参数详情
        </Button>
      );
    };

    this.btnGroup = [this.detailButton];
  }

  // 删除时的参数
  getDeleteParam = (record) => {
    return { service_id: record.service_id };
  };
}

export default ModelAddList;
